/*
 * TCSS 422
 * Project 2.
 */
public class ConsumerProcess extends AbstractProcess
{
	private static final String[] POSSIBLE_INSTRUCTIONS = {"CONSUME"};
	private String[] my_instructions;
	private SharedMemory my_buffer;
	
	public ConsumerProcess( int the_id,  String the_name, final int the_priority) 
	{
		super(the_id, the_name, the_priority);
	}
	
	public void setBuffer(final SharedMemory the_buffer)
	{
		my_buffer = the_buffer;
	}
	
	public SharedMemory getBuffer()
	{
		return my_buffer;
	}
	
	public void generateInstructions()
	{
		my_instructions = new String[super.getNumInstructions()];
		
		for (int i = 0; i < super.getNumInstructions(); i++)
		{
			my_instructions[i] = POSSIBLE_INSTRUCTIONS[0];
		}
	}

	@Override
	public String[] getInstructions() 
	{
		return my_instructions;
	}
}